package com.example.controller;

import com.example.service.DemoService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping ("/service-3")
@Slf4j
public class DemoController {

    @Autowired
    private DemoService demoService;

    @GetMapping("/test/{type}")
    public String test(@PathVariable String type) throws InterruptedException {
        log.info("service-3 接收到请求 type:{}",type);
        return demoService.test(type);
    }
}
